package com.ruoyi.back.service.impl;

import java.util.List;

import com.ruoyi.back.domain.IndustryConsulting;
import com.ruoyi.back.mapper.IndustryConsultingMapper;
import com.ruoyi.back.service.IIndustryConsultingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 行业资讯Service业务层处理
 * 
 * @author luguanqing
 * @date 2021-04-06
 */
@Service
public class IndustryConsultingServiceImpl implements IIndustryConsultingService
{
    @Autowired(required = false)
    private IndustryConsultingMapper industryConsultingMapper;

    /**
     * 查询行业资讯
     * 
     * @param id 行业资讯ID
     * @return 行业资讯
     */
    @Override
    public IndustryConsulting selectIndustryConsultingById(String id)
    {
        return industryConsultingMapper.selectIndustryConsultingById(id);
    }

    /**
     * 查询行业资讯列表
     * 
     * @param industryConsulting 行业资讯
     * @return 行业资讯
     */
    @Override
    public List<IndustryConsulting> selectIndustryConsultingList(IndustryConsulting industryConsulting)
    {
        return industryConsultingMapper.selectIndustryConsultingList(industryConsulting);
    }

    /**
     * 新增行业资讯
     * 
     * @param industryConsulting 行业资讯
     * @return 结果
     */
    @Override
    public int insertIndustryConsulting(IndustryConsulting industryConsulting)
    {
        return industryConsultingMapper.insertIndustryConsulting(industryConsulting);
    }

    /**
     * 修改行业资讯
     * 
     * @param industryConsulting 行业资讯
     * @return 结果
     */
    @Override
    public int updateIndustryConsulting(IndustryConsulting industryConsulting)
    {
        return industryConsultingMapper.updateIndustryConsulting(industryConsulting);
    }

    /**
     *
     * @param id 资讯id
     * @return
     */
    @Override
    public int updateVisit(String id) {
        return industryConsultingMapper.updateVisit(id);
    }

    /**
     * 批量删除行业资讯
     * 
     * @param ids 需要删除的行业资讯ID
     * @return 结果
     */
    @Override
    public int deleteIndustryConsultingByIds(String[] ids)
    {
        return industryConsultingMapper.deleteIndustryConsultingByIds(ids);
    }

    /**
     * 删除行业资讯信息
     * 
     * @param id 行业资讯ID
     * @return 结果
     */
    @Override
    public int deleteIndustryConsultingById(String id)
    {
        return industryConsultingMapper.deleteIndustryConsultingById(id);
    }
}
